package com.chenyuxin.ilp.mapper.user;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chenyuxin.ilp.model.entity.user.UserStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UserStatisticsMapper extends BaseMapper<UserStatistics> {
    @Update("UPDATE user_statistics SET open_file_view = open_file_view + #{viewCount} WHERE id = #{userId}")
    void updateViewCount(String userId, int viewCount);
    void batchUpdateStatistics(@Param("list") List<UserStatistics> list);
}
